package com.lc.tgxm.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.AsyPostForm;
import com.zcx.helper.http.note.HttpServer;

import org.json.JSONObject;

/**
 * BaseAsyPost No secret 单独不加密的基类 不受开关影响
 * Created by Administrator on 2016/3/14.
 */
@HttpServer(Conn.SERVICE)
public class BaseNosAsyPost<T> extends AsyPostForm<T> {

    public BaseNosAsyPost(AsyCallBack<T> asyCallBack) {
        super(asyCallBack);
    }

    @Override
    protected T parser(JSONObject object) {
        TOAST = object.optString("message");
        int code = object.optInt("code");
        return code == Conn.CODE_SUCCESS ? successParser(object) : null;
    }

    protected T successParser(JSONObject object){
        return null;
    }


}
